package com.example.companybusiness;

import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import java.util.List;

public class BottomPagerAdapter extends FragmentPagerAdapter {
    private List<Fragment> mList;

    public BottomPagerAdapter(@NonNull  FragmentManager fm, int behavior) {
        super(fm, behavior);
    }

    public void setmList(List<Fragment> mList) {
        this.mList = mList;
    }

    @NonNull
    @Override
    public Fragment getItem(int position) {
        return mList!=null?mList.get(position):null;
    }

    @Override
    public int getCount() {
        return mList!=null?mList.size():0;
    }


}
